package cn.ihrm.sass;

import cn.utils.IdWorker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Bean;

/**
 * 企业微服务
 * @author Mxb
 * @version 1.0
 * @date 2020/6/28 18:36
 */
@SpringBootApplication(scanBasePackages = "cn.ihrm.sass")
//配置jpa注解的扫描 就是扫描实体类
@EntityScan("cn.ihrm.sass.entity.company")
public class CompanyApplication {
    public static void main(String[] args) {
        SpringApplication.run(CompanyApplication.class, args);
    }

    /**
     * 将IdWorker对象放入到 容器中
     * @return
     */
    @Bean
    public IdWorker idWorker() {
        return new IdWorker(1, 1);
    }
}
